home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / gfx / misc / MesaGL-aux.lha / src / font.c < prev    next >
C/C++ Source or Header  |  1998-09-12  |  409b  |  27 lines

  1. /*
  2.  * font.c 
  3.  */
  4.  
  5. #include <string.h>
  6. #include "gltk.h"
  7. #include "glaux.h"
  8.  
  9. static GLuint bitmapBase;
  10.  
  11. void auxCreateFont(void)
  12. {
  13.   bitmapBase = glGenLists(256);
  14.   if (tkCreateBitmapFont(bitmapBase) == GL_FALSE) {
  15.     auxQuit();
  16.   }
  17. }
  18.  
  19. void auxDrawStr(char *str)
  20. {
  21.  
  22.   glPushAttrib(GL_LIST_BIT);
  23.   glListBase(bitmapBase);
  24.   glCallLists(strlen(str), GL_UNSIGNED_BYTE, (unsigned char *)str);
  25.   glPopAttrib();
  26. }
  27.